var purchaseOrder = {
	add : function() {
		new WindowPanel(
				{
					id : 'savePurchaseOrder',
					title : '新增采购订单',
					width : 710,
					height : 440,
					closeConfirm : true,
					maximizable : false,
					html : '<iframe name="purchaseOrderSaveFrame" id="purchaseOrderSaveFrame" src="'
							+ projectName
							+ '/purchase/purchaseOrder/toSave.t4m?'
							+ getFlushParam('savePurchaseOrder')
							+ '" frameborder="0" scrolling="auto"></iframe>',
					tbar : new Toolbar({
						icon : 'image/op.gif',
						items : [ {
							type : 'button',
							text : '保存',
							position : {
								a : '-80px 0px',
								b : '-80px -120px'
							},
							handler : function() {
								if (getFrame('purchaseOrderSaveFrame')
										.validate()) {
									submitFrameForm('purchaseOrderSaveFrame',
											'purchaseOrderForm');
								}
							}
						} ]
					})
				});
	},
	update : function(purchaseOrderId) {
		new WindowPanel(
				{
					id : 'updatePurchaseOrder',
					title : '修改采购订单',
					width : 710,
					height : 440,
					closeConfirm : true,
					maximizable : false,
					html : '<iframe name="purchaseOrderUpdateFrame" id="purchaseOrderUpdateFrame" src="'
							+ projectName
							+ '/purchase/purchaseOrder/toUpdate.t4m?'
							+ getFlushParam('updatePurchaseOrder')
							+ '&purchaseOrderId='
							+ purchaseOrderId
							+ '" frameborder="0" scrolling="auto"></iframe>',
					tbar : new Toolbar({
						icon : 'image/op.gif',
						items : [ {
							type : 'button',
							text : '保存',
							position : {
								a : '-80px 0px',
								b : '-80px -120px'
							},
							handler : function() {
								if (getFrame('purchaseOrderUpdateFrame')
										.validate()) {
									submitFrameForm('purchaseOrderUpdateFrame',
											'purchaseOrderForm');
								}
							}
						} ]
					})
				});
	},
	view : function(purchaseOrderId) {
		new WindowPanel(
				{
					id : 'viewPurchaseOrder',
					title : '查看采购订单',
					width : 720,
					height : 440,
					closeConfirm : true,
					maximizable : false,
					html : '<iframe name="purchaseOrderViewFrame" id="purchaseOrderViewFrame" src="'
							+ projectName
							+ '/purchase/purchaseOrder/toView.t4m?'
							+ getFlushParam('viewPurchaseOrder')
							+ '&purchaseOrderId='
							+ purchaseOrderId
							+ '" frameborder="0" scrolling="auto"></iframe>'
				});
	}
};